package com.chenwei.design.proxy.staticProxy;

/**
 * 代理对象
 * @author: chenwei
 * @date: 2021/3/28 12:27
 */
public class ProxyObject implements ProxyInterface {

    private ProxyInterface targetWork;//目标对象

    public ProxyObject(ProxyInterface targetWork) {
        this.targetWork = targetWork;
    }

    @Override
    public void work() {
        System.out.println("代理前的操作");
        targetWork.work();
        System.out.println("代理后的操作");
    }
}
